package kr.co.mustgo.domain.reservation;

import java.io.Serializable;
import java.util.Date;

public class Reservation implements Serializable{
	private String reserveCode;//예약코드
	private String demand;//요청사항
	private Date reserveDate;//예약일자
	private String reserveStatus;//예약상태
	private int reserveNum;//예약인원
	//fk
	private String id;//id
	private String productCode;//상품코드
	
	public Reservation(){}
	
	public Reservation(String reserveCode, String demand, Date reserveDate,
			String reserveStatus, int reserveNum, String id, String productCode) {
		super();
		this.reserveCode = reserveCode;
		this.demand = demand;
		this.reserveDate = reserveDate;
		this.reserveStatus = reserveStatus;
		this.reserveNum = reserveNum;
		this.id = id;
		this.productCode = productCode;
		
		
	}

	public String getReserveCode() {
		return reserveCode;
	}

	public void setReserveCode(String reserveCode) {
		this.reserveCode = reserveCode;
	}

	public String getDemand() {
		return demand;
	}

	public void setDemand(String demand) {
		this.demand = demand;
	}

	public Date getReserveDate() {
		return reserveDate;
	}

	public void setReserveDate(Date reserveDate) {
		this.reserveDate = reserveDate;
	}

	public String getReserveStatus() {
		return reserveStatus;
	}

	public void setReserveStatus(String reserveStatus) {
		this.reserveStatus = reserveStatus;
	}

	public int getReserveNum() {
		return reserveNum;
	}

	public void setReserveNum(int reserveNum) {
		this.reserveNum = reserveNum;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getProductCode() {
		return productCode;
	}

	public void setProductCode(String productCode) {
		this.productCode = productCode;
	}

	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((demand == null) ? 0 : demand.hashCode());
		result = prime * result + ((id == null) ? 0 : id.hashCode());
		result = prime * result
				+ ((productCode == null) ? 0 : productCode.hashCode());
		result = prime * result
				+ ((reserveCode == null) ? 0 : reserveCode.hashCode());
		result = prime * result
				+ ((reserveDate == null) ? 0 : reserveDate.hashCode());
		result = prime * result + reserveNum;
		result = prime * result
				+ ((reserveStatus == null) ? 0 : reserveStatus.hashCode());
		return result;
	}

	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Reservation other = (Reservation) obj;
		if (demand == null) {
			if (other.demand != null)
				return false;
		} else if (!demand.equals(other.demand))
			return false;
		if (id == null) {
			if (other.id != null)
				return false;
		} else if (!id.equals(other.id))
			return false;
		if (productCode == null) {
			if (other.productCode != null)
				return false;
		} else if (!productCode.equals(other.productCode))
			return false;
		if (reserveCode == null) {
			if (other.reserveCode != null)
				return false;
		} else if (!reserveCode.equals(other.reserveCode))
			return false;
		if (reserveDate == null) {
			if (other.reserveDate != null)
				return false;
		} else if (!reserveDate.equals(other.reserveDate))
			return false;
		if (reserveNum != other.reserveNum)
			return false;
		if (reserveStatus == null) {
			if (other.reserveStatus != null)
				return false;
		} else if (!reserveStatus.equals(other.reserveStatus))
			return false;
		return true;
	}

	public String toString() {
		return "Reservation [reserveCode=" + reserveCode + ", demand=" + demand
				+ ", reserveDate=" + reserveDate + ", reserveStatus="
				+ reserveStatus + ", reserveNum=" + reserveNum + ", id=" + id
				+ ", productCode=" + productCode + "]";
	}
	
	
}
